package com.itly.rwzm.controller;

import com.itly.rwzm.pojo.*;
import com.itly.rwzm.service.VisualizationSetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: 罗言
 * @Version: 1.0
 * @Date: 2023-12-30-15:04
 * @Description:
 */
@Controller
@RequestMapping("/vis")
public class VisualizationSetController {

    @Autowired
    private VisualizationSetService service;

    @GetMapping("/getData1")
    @ResponseBody
    public Result getData1() {
        List<VisualizationParam> data1 = service.getData1();
        return new Result(data1 != null ? Code.GET_OK: Code.GET_ERR, data1);
    }

    @GetMapping("/getData2")
    @ResponseBody
    public Result getData2() {
        List<VisualizationParam> data1 = service.getData2();
        return new Result(data1 != null ? Code.GET_OK: Code.GET_ERR, data1);
    }

    @GetMapping("/getData3")
    @ResponseBody
    public Result getData3() {
        List<VisualizationParam> data1 = service.getData3();
        return new Result(data1 != null ? Code.GET_OK: Code.GET_ERR, data1);
    }

    @GetMapping("/getData4")
    @ResponseBody
    public Result getData4() {
        List<VisualizationParam> data1 = service.getData4();
        return new Result(data1 != null ? Code.GET_OK: Code.GET_ERR, data1);
    }

    @GetMapping("/getData5")
    @ResponseBody
    public Result getData5() {
        List<VisualizationParam> data1 = service.getData5();
        return new Result(data1 != null ? Code.GET_OK: Code.GET_ERR, data1);
    }

    @GetMapping("/getData6")
    @ResponseBody
    public Result getData6() {
        List<VisualizationParam> data1 = service.getData6();
        return new Result(data1 != null ? Code.GET_OK: Code.GET_ERR, data1);
    }

    @GetMapping("/getData7")
    @ResponseBody
    public Result getData7() {
        List<VisualizationParam> data1 = service.getData7();
        return new Result(data1 != null ? Code.GET_OK: Code.GET_ERR, data1);
    }

    @GetMapping("/getData8")
    @ResponseBody
    public Result getData8() {
        List<VisualizationParam> data1 = service.getData8();
        return new Result(data1 != null ? Code.GET_OK: Code.GET_ERR, data1);
    }


    @GetMapping("/getData9")
    @ResponseBody
    public Result getData9() {
        List<VisualizationParam> data1 = service.getData9();
        return new Result(data1 != null ? Code.GET_OK: Code.GET_ERR, data1);
    }

    @GetMapping("/getData10")
    @ResponseBody
    public Result getData10() {
        List<VisualizationParam> data1 = service.getData10();
        return new Result(data1 != null ? Code.GET_OK: Code.GET_ERR, data1);
    }

    @GetMapping("/getData11")
    @ResponseBody
    public Result getData11() {
        List<VisualizationParam> data1 = service.getData11();
        return new Result(data1 != null ? Code.GET_OK: Code.GET_ERR, data1);
    }


    @GetMapping("/getData12")
    @ResponseBody
    public Result getData12() {
        List<VisualizationParam> data1 = service.getData12();
        return new Result(data1 != null ? Code.GET_OK: Code.GET_ERR, data1);
    }

    @GetMapping("/getData13")
    @ResponseBody
    public Result getData13() {
        List<VisualizationParam> data1 = service.getData13();
        return new Result(data1 != null ? Code.GET_OK: Code.GET_ERR, data1);
    }

    @GetMapping("/getData14")
    @ResponseBody
    public Result getData14() {
        List<VisualizationParam> data1 = service.getData14();
        return new Result(data1 != null ? Code.GET_OK: Code.GET_ERR, data1);
    }

    @GetMapping("/getData15")
    @ResponseBody
    public Result getData15() {
        List<VisualizationParam> data1 = service.getData15();
        return new Result(data1 != null ? Code.GET_OK: Code.GET_ERR, data1);
    }

    @GetMapping("/getData16")
    @ResponseBody
    public Result getData16() {
        List<VisualizationParam> data1 = service.getData16();
        return new Result(data1 != null ? Code.GET_OK: Code.GET_ERR, data1);
    }

    @GetMapping("/getData17")
    @ResponseBody
    public Result getData17() {
        Integer data = service.getData17();
        return new Result(data >= 0 ? Code.GET_OK: Code.GET_ERR, data);
    }

    @PostMapping("/getData18")
    @ResponseBody
    public Result getData18(@RequestBody PageData pageData) {
        List<PageParam> data = service.getData18(pageData);
        return new Result(data != null ? Code.GET_OK: Code.GET_ERR, data);
    }

}
